package ltd.smallwang.client.task.dto;

import jakarta.validation.constraints.Max;
import jakarta.validation.constraints.Min;
import jakarta.validation.constraints.Size;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.time.LocalDateTime;

/**
 * @author justd
 * @description 功能描述
 * @since 2024-05-01 01:19
 **/
@Data
public class TaskExecuteRecordAddCmd {
  private Long taskId;

  @Size(min = 1, max = 512, message = "name length must be between 1 and 512")
  private String taskName;

  @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
  private LocalDateTime startTime;

  @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
  private LocalDateTime endTime;

  @Min(0)
  @Max(2)
  private Integer recordBy;

  private Long categoryId;
}
